package servlet;

import javabean.Factory;


public class CheckUserExecute extends BaseServlet{
	/**
	 * 
	 */
	private static final long serialVersionUID = -8538076142868886263L;
	
	public void service() throws Exception{
		String checkkey = request.getParameter("checkkey");
		try{
			if(checkkey!=null){
				if(!"".equals(Factory.getUserDAOInstance().queryNameByUidOrEmail(checkkey))){
					response.getWriter().write("{\"success\":true,\"msg\":\"已存在\"}");
				}else{
					response.getWriter().write("{\"success\":false,\"msg\":\"可用\"}");
				}
			}
		}catch(Exception ex){
			System.out.println("服务器异常");
		}
	}
}
